from django.db import models
from django.utils import timezone


class AliUser(models.Model):
    Gender = ((1, "m"), (2, "f"), (0, "未知"))
    ali_user_id = models.CharField(db_index=True, verbose_name="阿里用户id", max_length=64)
    mobile = models.CharField(verbose_name="用户手机号", max_length=16, blank=True, null=True)
    city = models.CharField(verbose_name="市", max_length=16, blank=True, null=True)
    province = models.CharField(verbose_name="省", max_length=16, blank=True, null=True)
    create_time = models.DateTimeField(verbose_name="创建时间", default=timezone.now)
    head_url = models.CharField(max_length=512, blank=True, null=True, verbose_name="头像")
    sex = models.IntegerField(default=1, choices=Gender)

    class Meta:
        verbose_name = "支付宝用户"
        verbose_name_plural = verbose_name
